package com.xdog.web3.service.impl.twitter;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.xdog.common.core.domain.R;
import com.xdog.web3.domain.twitter.TwitterFollowUser;
import com.xdog.web3.service.twitter.ITwitterFollowUserService;
import com.xdog.web3.utils.TwitterAvatarDownloader;
import lombok.extern.slf4j.Slf4j;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * Twitter关注数据服务实现类
 */
@Slf4j
@Service
public class TwitterFollowDataServiceImpl {

    @Autowired
    private ITwitterFollowUserService twitterFollowUserService;

    @Autowired
    private TwitterAvatarDownloader avatarDownloader;

    @Value("${twitter.api.key}")
    private String apiKey;

    private final OkHttpClient client = new OkHttpClient();

    /**
     * 处理并保存关注用户数据
     * @param jsonResponse Twitter API返回的JSON响应
     */
    public void processAndSaveFollowUsers(String jsonResponse) {
        try {
            JSONObject root = JSON.parseObject(jsonResponse);
            List<TwitterFollowUser> followUsers = parseFollowUsers(root);

            // 下载并保存用户头像
            for (TwitterFollowUser user : followUsers) {
                if (StringUtils.isNotEmpty(user.getProfileImageUrl())) {
                    String localPath = avatarDownloader.downloadAvatar(user.getProfileImageUrl(), user.getUserId());
                    user.setLocalAvatarPath(localPath);
                }
                user.setUpdateTime(LocalDateTime.now());
            }

            // 保存到数据库
            twitterFollowUserService.saveOrUpdateBatch(followUsers);

            log.info("成功处理并保存 {} 个Twitter关注用户", followUsers.size());
        } catch (Exception e) {
            log.error("处理Twitter关注用户数据失败", e);
        }
    }

    /**
     * 解析关注用户数据
     * @param root JSON根对象
     * @return 关注用户列表
     */
    private List<TwitterFollowUser> parseFollowUsers(JSONObject root) {
        List<TwitterFollowUser> followUsers = new ArrayList<>();

        try {
            // 递归解析整个JSON结构，查找所有用户信息
            parseJsonRecursively(root, followUsers);
        } catch (Exception e) {
            log.error("解析Twitter关注用户数据失败", e);
        }

        return followUsers;
    }

    /**
     * 递归解析JSON结构，查找用户信息
     * @param obj JSON对象
     * @param followUsers 用户列表
     */
    private void parseJsonRecursively(Object obj, List<TwitterFollowUser> followUsers) {
        if (obj instanceof JSONObject) {
            JSONObject jsonObj = (JSONObject) obj;

            // 检查是否包含用户结果
            if (jsonObj.containsKey("user_results")) {
                JSONObject userResults = jsonObj.getJSONObject("user_results");
                if (userResults.containsKey("result")) {
                    JSONObject result = userResults.getJSONObject("result");
                    TwitterFollowUser followUser = parseUserResult(result);
                    if (followUser != null) {
                        // 避免重复添加
                        boolean exists = followUsers.stream()
                            .anyMatch(u -> u.getUserId().equals(followUser.getUserId()));
                        if (!exists) {
                            followUsers.add(followUser);
                        }
                    }
                }
            }

            // 递归处理所有子对象
            for (String key : jsonObj.keySet()) {
                Object value = jsonObj.get(key);
                parseJsonRecursively(value, followUsers);
            }
        } else if (obj instanceof JSONArray) {
            JSONArray jsonArray = (JSONArray) obj;
            for (int i = 0; i < jsonArray.size(); i++) {
                parseJsonRecursively(jsonArray.get(i), followUsers);
            }
        }
    }

    /**
     * 解析用户结果数据
     * @param result 用户结果对象
     * @return Twitter关注用户对象
     */
    private TwitterFollowUser parseUserResult(JSONObject result) {
        try {
            TwitterFollowUser user = new TwitterFollowUser();

            // 解析用户基本信息
            String userId = result.getString("rest_id");
            if (userId == null || userId.isEmpty()) {
                return null;
            }

            user.setUserId(userId);

            JSONObject legacy = result.getJSONObject("legacy");
            if (legacy != null) {
                user.setName(legacy.getString("name"));
                user.setScreenName(legacy.getString("screen_name"));
                user.setProfileImageUrl(legacy.getString("profile_image_url_https"));
                user.setFollowersCount(legacy.getIntValue("followers_count"));
                user.setFollowingCount(legacy.getIntValue("friends_count"));
                user.setTweetsCount(legacy.getIntValue("statuses_count"));
                user.setDescription(legacy.getString("description"));
                user.setVerified(legacy.getBoolean("verified"));

                // 构造主页地址
                String screenName = legacy.getString("screen_name");
                if (screenName != null && !screenName.isEmpty()) {
                    user.setProfileUrl("https://twitter.com/" + screenName);
                }
            }

            user.setCreateTime(LocalDateTime.now());
            user.setUpdateTime(LocalDateTime.now());

            return user;
        } catch (Exception e) {
            log.error("解析Twitter用户结果数据失败", e);
            return null;
        }
    }

    /**
     * 通过API获取Twitter关注用户数据
     * @param userId Twitter用户ID
     * @param count 获取数量
     */
    public void fetchFollowUsersFromAPI(String userId, int count) {
        try {
            String json = "{\"user\":{\"result\":{\"__typename\":\"User\",\"timeline\":{\"timeline\":{\"instructions\":[{\"type\":\"TimelineClearCache\"},{\"type\":\"TimelineTerminateTimeline\",\"direction\":\"Top\"},{\"type\":\"TimelineTerminateTimeline\",\"direction\":\"Bottom\"},{\"type\":\"TimelineAddEntries\",\"entries\":[{\"entryId\":\"user-1639061546532851713\",\"sortIndex\":\"1984143216454139904\",\"content\":{\"entryType\":\"TimelineTimelineItem\",\"__typename\":\"TimelineTimelineItem\",\"itemContent\":{\"itemType\":\"TimelineUser\",\"__typename\":\"TimelineUser\",\"user_results\":{\"result\":{\"__typename\":\"User\",\"id\":\"VXNlcjoxNjM5MDYxNTQ2NTMyODUxNzEz\",\"rest_id\":\"1639061546532851713\",\"affiliates_highlighted_label\":{},\"has_graduated_access\":true,\"parody_commentary_fan_label\":\"None\",\"is_blue_verified\":true,\"profile_image_shape\":\"Circle\",\"legacy\":{\"following\":false,\"can_dm\":true,\"can_media_tag\":true,\"created_at\":\"Fri Mar 24 00:28:56 +0000 2023\",\"default_profile\":true,\"default_profile_image\":false,\"description\":\"脚踏实地，仰望星空！#xdog\",\"entities\":{\"description\":{\"urls\":[]}},\"fast_followers_count\":0,\"favourites_count\":5508,\"followers_count\":6137,\"friends_count\":310,\"has_custom_timelines\":false,\"is_translator\":false,\"listed_count\":8,\"location\":\"\",\"media_count\":692,\"name\":\"轻舟\",\"normal_followers_count\":6137,\"pinned_tweet_ids_str\":[\"1981796602076643687\"],\"possibly_sensitive\":false,\"profile_banner_url\":\"https://pbs.twimg.com/profile_banners/1639061546532851713/1761483919\",\"profile_image_url_https\":\"https://pbs.twimg.com/profile_images/1977751600115691520/RNLknqX6_normal.jpg\",\"profile_interstitial_type\":\"\",\"screen_name\":\"qingzhou0414\",\"statuses_count\":7955,\"translator_type\":\"none\",\"verified\":false,\"want_retweets\":false,\"withheld_in_countries\":[]},\"professional\":{\"rest_id\":\"1663238865904361473\",\"professional_type\":\"Creator\",\"category\":[{\"id\":192,\"name\":\"Financial Services\",\"icon_name\":\"IconBriefcaseStroke\"}]},\"tipjar_settings\":{\"is_enabled\":true,\"bitcoin_handle\":\"\",\"ethereum_handle\":\"0x479bba2ba296c595596eb53098f7812e3cf2b321\"}}},\"userDisplayType\":\"User\"},\"clientEventInfo\":{\"component\":\"FollowingSgs\",\"element\":\"user\"}}},{\"entryId\":\"user-1834447507059068928\",\"sortIndex\":\"1984143216454139903\",\"content\":{\"entryType\":\"TimelineTimelineItem\",\"__typename\":\"TimelineTimelineItem\",\"itemContent\":{\"itemType\":\"TimelineUser\",\"__typename\":\"TimelineUser\",\"user_results\":{\"result\":{\"__typename\":\"User\",\"id\":\"VXNlcjoxODM0NDQ3NTA3MDU5MDY4OTI4\",\"rest_id\":\"1834447507059068928\",\"affiliates_highlighted_label\":{},\"has_graduated_access\":true,\"parody_commentary_fan_label\":\"Parody\",\"is_blue_verified\":true,\"profile_image_shape\":\"Circle\",\"legacy\":{\"following\":false,\"can_dm\":true,\"can_media_tag\":true,\"created_at\":\"Fri Sep 13 04:22:39 +0000 2024\",\"default_profile\":true,\"default_profile_image\":false,\"description\":\"XDOG early builder-Community = everything $XDOG CA: 0x0cc24c51bf89c00c5affbfcf5e856c25ecbdb48e\",\"entities\":{\"description\":{\"urls\":[]}},\"fast_followers_count\":0,\"favourites_count\":5206,\"followers_count\":356,\"friends_count\":252,\"has_custom_timelines\":false,\"is_translator\":false,\"listed_count\":1,\"location\":\"OKX\",\"media_count\":865,\"name\":\"MeMeMan_OKX\",\"normal_followers_count\":356,\"pinned_tweet_ids_str\":[\"1984074713182957726\"],\"possibly_sensitive\":false,\"profile_banner_url\":\"https://pbs.twimg.com/profile_banners/1834447507059068928/1758461947\",\"profile_image_url_https\":\"https://pbs.twimg.com/profile_images/1977974009590579200/Mbcx84RT_normal.jpg\",\"profile_interstitial_type\":\"\",\"screen_name\":\"MeMeMan_OKX\",\"statuses_count\":3454,\"translator_type\":\"none\",\"verified\":false,\"want_retweets\":false,\"withheld_in_countries\":[]},\"tipjar_settings\":{}}},\"userDisplayType\":\"User\"},\"clientEventInfo\":{\"component\":\"FollowingSgs\",\"element\":\"user\"}}},{\"entryId\":\"user-1970545127937712133\",\"sortIndex\":\"1984143216454139902\",\"content\":{\"entryType\":\"TimelineTimelineItem\",\"__typename\":\"TimelineTimelineItem\",\"itemContent\":{\"itemType\":\"TimelineUser\",\"__typename\":\"TimelineUser\",\"user_results\":{\"result\":{\"__typename\":\"User\",\"id\":\"VXNlcjoxOTcwNTQ1MTI3OTM3NzEyMTMz\",\"rest_id\":\"1970545127937712133\",\"affiliates_highlighted_label\":{},\"has_graduated_access\":true,\"parody_commentary_fan_label\":\"None\",\"is_blue_verified\":true,\"profile_image_shape\":\"Circle\",\"legacy\":{\"following\":false,\"can_dm\":true,\"can_media_tag\":true,\"created_at\":\"Tue Sep 23 17:45:52 +0000 2025\",\"default_profile\":true,\"default_profile_image\":false,\"description\":\"@JennyTaylo95768 （此号已掉不要关注）Xdog社区负责人国际社区群:https://t.co/QEZlQzaHl0合约：0x0cc24c51bf89c00c5affbfcf5e856c25ecbdb48e\",\"entities\":{\"description\":{\"urls\":[{\"display_url\":\"t.me/okbokbokx\",\"expanded_url\":\"http://t.me/okbokbokx\",\"url\":\"https://t.co/QEZlQzaHl0\",\"indices\":[42,65]}]}},\"fast_followers_count\":0,\"favourites_count\":1448,\"followers_count\":685,\"friends_count\":183,\"has_custom_timelines\":false,\"is_translator\":false,\"listed_count\":2,\"location\":\"\",\"media_count\":163,\"name\":\"伞公司.OKX\",\"normal_followers_count\":685,\"pinned_tweet_ids_str\":[\"1972980824275624056\"],\"possibly_sensitive\":false,\"profile_banner_url\":\"https://pbs.twimg.com/profile_banners/1970545127937712133/1761468298\",\"profile_image_url_https\":\"https://pbs.twimg.com/profile_images/1977322842078482432/laHx19Kv_normal.jpg\",\"profile_interstitial_type\":\"\",\"screen_name\":\"asanxdog\",\"statuses_count\":646,\"translator_type\":\"none\",\"verified\":false,\"want_retweets\":false,\"withheld_in_countries\":[]},\"tipjar_settings\":{}}},\"userDisplayType\":\"User\"},\"clientEventInfo\":{\"component\":\"FollowingSgs\",\"element\":\"user\"}}},{\"entryId\":\"user-1742121457898119168\",\"sortIndex\":\"1984143216454139901\",\"content\":{\"entryType\":\"TimelineTimelineItem\",\"__typename\":\"TimelineTimelineItem\",\"itemContent\":{\"itemType\":\"TimelineUser\",\"__typename\":\"TimelineUser\",\"user_results\":{\"result\":{\"__typename\":\"User\",\"id\":\"VXNlcjoxNzQyMTIxNDU3ODk4MTE5MTY4\",\"rest_id\":\"1742121457898119168\",\"affiliates_highlighted_label\":{\"label\":{\"url\":{\"url\":\"https://twitter.com/BitgetWallet\",\"urlType\":\"DeepLink\"},\"badge\":{\"url\":\"https://pbs.twimg.com/profile_images/1983940485069811712/aAnECf3c_bigger.png\"},\"description\":\"Bitget Wallet \uD83E\uDE75\",\"userLabelType\":\"BusinessLabel\",\"userLabelDisplayType\":\"Badge\"}},\"has_graduated_access\":true,\"parody_commentary_fan_label\":\"None\",\"is_blue_verified\":true,\"profile_image_shape\":\"Circle\",\"legacy\":{\"following\":false,\"can_dm\":true,\"can_media_tag\":true,\"created_at\":\"Tue Jan 02 09:51:49 +0000 2024\",\"default_profile\":true,\"default_profile_image\":false,\"description\":\"Bergabung bersama kami dengan lebih dari 80 juta pengguna melakukan pertukaran, mempertaruhkan, memperdagangkan, & memperoleh kripto di Bitget Wallet\uD83D\uDC99\",\"entities\":{\"description\":{\"urls\":[]},\"url\":{\"urls\":[{\"display_url\":\"t.me/bitget_wallet_…\",\"expanded_url\":\"https://t.me/bitget_wallet_indonesia\",\"url\":\"https://t.co/1ra9r1pwFB\",\"indices\":[0,23]}]}},\"fast_followers_count\":0,\"favourites_count\":1958,\"followers_count\":39503,\"friends_count\":200,\"has_custom_timelines\":false,\"is_translator\":false,\"listed_count\":7,\"location\":\"\",\"media_count\":913,\"name\":\"Bitget Wallet Indonesia \uD83C\uDDEE\uD83C\uDDE9\",\"normal_followers_count\":39503,\"pinned_tweet_ids_str\":[\"1983141640069099979\"],\"possibly_sensitive\":false,\"profile_banner_url\":\"https://pbs.twimg.com/profile_banners/1742121457898119168/1747821960\",\"profile_image_url_https\":\"https://pbs.twimg.com/profile_images/1925129474301136896/fvno0nD9_normal.jpg\",\"profile_interstitial_type\":\"\",\"screen_name\":\"BitgetWalletID\",\"statuses_count\":2871,\"translator_type\":\"none\",\"url\":\"https://t.co/1ra9r1pwFB\",\"verified\":false,\"want_retweets\":false,\"withheld_in_countries\":[]},\"professional\":{\"rest_id\":\"1902051279691727303\",\"professional_type\":\"Business\",\"category\":[{\"id\":962,\"name\":\"Mobile Application\",\"icon_name\":\"IconBriefcaseStroke\"}]},\"tipjar_settings\":{}}},\"userDisplayType\":\"User\"},\"clientEventInfo\":{\"component\":\"FollowingSgs\",\"element\":\"user\"}}},{\"entryId\":\"user-1322211651714748416\",\"sortIndex\":\"1984143216454139900\",\"content\":{\"entryType\":\"TimelineTimelineItem\",\"__typename\":\"TimelineTimelineItem\",\"itemContent\":{\"itemType\":\"TimelineUser\",\"__typename\":\"TimelineUser\",\"user_results\":{\"result\":{\"__typename\":\"User\",\"id\":\"VXNlcjoxMzIyMjExNjUxNzE0NzQ4NDE2\",\"rest_id\":\"1322211651714748416\",\"affiliates_highlighted_label\":{},\"has_graduated_access\":true,\"parody_commentary_fan_label\":\"None\",\"is_blue_verified\":true,\"profile_image_shape\":\"Circle\",\"legacy\":{\"following\":false,\"can_dm\":true,\"can_media_tag\":false,\"created_at\":\"Fri Oct 30 16:20:57 +0000 2020\",\"default_profile\":true,\"default_profile_image\":false,\"description\":\"Cybersecurity Specialist | DeFi Developer & Researcher | OKX/X Layer Visionary Builder | Crypto Market Analyst & Strategist\",\"entities\":{\"description\":{\"urls\":[]},\"url\":{\"urls\":[{\"display_url\":\"t.me/jaffyjee\",\"expanded_url\":\"https://t.me/jaffyjee\",\"url\":\"https://t.co/p5mydxof0U\",\"indices\":[0,23]}]}},\"fast_followers_count\":0,\"favourites_count\":37451,\"followers_count\":1435,\"friends_count\":1596,\"has_custom_timelines\":false,\"is_translator\":false,\"listed_count\":2,\"location\":\"Amsterdam, The Netherlands\",\"media_count\":3341,\"name\":\"JAFFYJEE.OKX\",\"normal_followers_count\":1435,\"pinned_tweet_ids_str\":[\"1982145769814581522\"],\"possibly_sensitive\":false,\"profile_banner_url\":\"https://pbs.twimg.com/profile_banners/1322211651714748416/1759136679\",\"profile_image_url_https\":\"https://pbs.twimg.com/profile_images/1972588785637400576/WQOW0EsW_normal.jpg\",\"profile_interstitial_type\":\"\",\"screen_name\":\"JAFFYJEE\",\"statuses_count\":53171,\"translator_type\":\"none\",\"url\":\"https://t.co/p5mydxof0U\",\"verified\":false,\"want_retweets\":false,\"withheld_in_countries\":[]},\"professional\":{\"rest_id\":\"1601243425302614024\",\"professional_type\":\"Creator\",\"category\":[{\"id\":477,\"name\":\"Professional Services\",\"icon_name\":\"IconBriefcaseStroke\"}]},\"tipjar_settings\":{\"is_enabled\":true,\"bitcoin_handle\":\"bc1q9zy595f5yv4tknxlff0s7jpcdfyglmhkuc833q\",\"cash_app_handle\":\"jaffyjee\",\"ethereum_handle\":\"0x80CC8f5f57D10f2ee49778AD2d15489934CC05EB\",\"venmo_handle\":\"\"}}},\"userDisplayType\":\"User\"},\"clientEventInfo\":{\"component\":\"FollowingSgs\",\"element\":\"user\"}}},{\"entryId\":\"user-1498248767711383552\",\"sortIndex\":\"1984143216454139899\",\"content\":{\"entryType\":\"TimelineTimelineItem\",\"__typename\":\"TimelineTimelineItem\",\"itemContent\":{\"itemType\":\"TimelineUser\",\"__typename\":\"TimelineUser\",\"user_results\":{\"result\":{\"__typename\":\"User\",\"id\":\"VXNlcjoxNDk4MjQ4NzY3NzExMzgzNTUy\",\"rest_id\":\"1498248767711383552\",\"affiliates_highlighted_label\":{},\"has_graduated_access\":true,\"parody_commentary_fan_label\":\"None\",\"is_blue_verified\":true,\"profile_image_shape\":\"Circle\",\"legacy\":{\"following\":false,\"can_dm\":true,\"can_media_tag\":false,\"created_at\":\"Mon Feb 28 10:48:59 +0000 2022\",\"default_profile\":true,\"default_profile_image\":false,\"description\":\"喜欢CTO，始终认为在加密圈做减法，并付出100%的努力就会拿到回报｜一个17年的老og一级二级找金狗 #okx #binance｜okx节约返现20%-30%手续费 邀请码 ：WEB3DADI 。TG可以加入交流：https://t.co/osEwF0FBqS 全链热点频道 https://t.co/cB0MwzMm1w\",\"entities\":{\"description\":{\"urls\":[{\"display_url\":\"t.me/okx_xlayer\",\"expanded_url\":\"https://t.me/okx_xlayer\",\"url\":\"https://t.co/osEwF0FBqS\",\"indices\":[108,131]},{\"display_url\":\"t.me/SharkDBS\",\"expanded_url\":\"https://t.me/SharkDBS\",\"url\":\"https://t.co/cB0MwzMm1w\",\"indices\":[139,162]}]},\"url\":{\"urls\":[{\"display_url\":\"t.me/SharkDBS\",\"expanded_url\":\"https://t.me/SharkDBS\",\"url\":\"https://t.co/cB0MwzMm1w\",\"indices\":[0,23]}]}},\"fast_followers_count\":0,\"favourites_count\":17020,\"followers_count\":15250,\"friends_count\":1603,\"has_custom_timelines\":false,\"is_translator\":false,\"listed_count\":58,\"location\":\"Hong Kong\",\"media_count\":1113,\"name\":\"大帝\",\"normal_followers_count\":15250,\"pinned_tweet_ids_str\":[],\"possibly_sensitive\":false,\"profile_banner_url\":\"https://pbs.twimg.com/profile_banners/1498248767711383552/1672666226\",\"profile_image_url_https\":\"https://pbs.twimg.com/profile_images/1769547731469746176/X_U76F7N_normal.jpg\",\"profile_interstitial_type\":\"\",\"screen_name\":\"DBSdabaisha\",\"statuses_count\":9114,\"translator_type\":\"none\",\"url\":\"https://t.co/cB0MwzMm1w\",\"verified\":false,\"want_retweets\":false,\"withheld_in_countries\":[]},\"professional\":{\"rest_id\":\"1534718050410582016\",\"professional_type\":\"Business\",\"category\":[{\"id\":15,\"name\":\"Entertainment & Recreation\",\"icon_name\":\"IconBriefcaseStroke\"}]},\"tipjar_settings\":{\"is_enabled\":false,\"bitcoin_handle\":\"33o1xHziRUeibn7DF283ypEschCCu5vZdV\",\"ethereum_handle\":\"0xd22DDa00E742205B94706A25c583A3C5F2ee3976\"}}},\"userDisplayType\":\"User\"},\"clientEventInfo\":{\"component\":\"FollowingSgs\",\"element\":\"user\"}}},{\"entryId\":\"user-1003840309166366721\",\"sortIndex\":\"1984143216454139898\",\"content\":{\"entryType\":\"TimelineTimelineItem\",\"__typename\":\"TimelineTimelineItem\",\"itemContent\":{\"itemType\":\"TimelineUser\",\"__typename\":\"TimelineUser\",\"user_results\":{\"result\":{\"__typename\":\"User\",\"id\":\"VXNlcjoxMDAzODQwMzA5MTY2MzY2NzIx\",\"rest_id\":\"1003840309166366721\",\"affiliates_highlighted_label\":{\"label\":{\"url\":{\"url\":\"https://twitter.com/binance\",\"urlType\":\"DeepLink\"},\"badge\":{\"url\":\"https://pbs.twimg.com/profile_images/1940131561103347712/f5y2qENu_bigger.jpg\"},\"description\":\"Binance\",\"userLabelType\":\"BusinessLabel\",\"userLabelDisplayType\":\"Badge\"}},\"has_graduated_access\":true,\"parody_commentary_fan_label\":\"None\",\"is_blue_verified\":true,\"profile_image_shape\":\"Circle\",\"legacy\":{\"following\":false,\"can_dm\":true,\"can_media_tag\":true,\"created_at\":\"Tue Jun 05 03:25:54 +0000 2018\",\"default_profile\":true,\"default_profile_image\":false,\"description\":\"Co-Founder & Chief Customer Service Officer @Binance  \\nHolder of #BNB\",\"entities\":{\"description\":{\"urls\":[]},\"url\":{\"urls\":[{\"display_url\":\"binance.com\",\"expanded_url\":\"http://binance.com\",\"url\":\"https://t.co/cAe7RYbdrS\",\"indices\":[0,23]}]}},\"fast_followers_count\":0,\"favourites_count\":2201,\"followers_count\":524783,\"friends_count\":1134,\"has_custom_timelines\":true,\"is_translator\":false,\"listed_count\":3382,\"location\":\"Mars\",\"media_count\":308,\"name\":\"Yi He\",\"normal_followers_count\":524783,\"pinned_tweet_ids_str\":[\"1911845602281095388\"],\"possibly_sensitive\":false,\"profile_banner_url\":\"https://pbs.twimg.com/profile_banners/1003840309166366721/1607445425\",\"profile_image_url_https\":\"https://pbs.twimg.com/profile_images/1974520590410170369/q2Q0S0fa_normal.jpg\",\"profile_interstitial_type\":\"\",\"screen_name\":\"heyibinance\",\"statuses_count\":4372,\"translator_type\":\"none\",\"url\":\"https://t.co/cAe7RYbdrS\",\"verified\":false,\"want_retweets\":false,\"withheld_in_countries\":[]},\"professional\":{\"rest_id\":\"1531315876917821440\",\"professional_type\":\"Creator\",\"category\":[{\"id\":958,\"name\":\"Entrepreneur\",\"icon_name\":\"IconBriefcaseStroke\"}]},\"tipjar_settings\":{\"is_enabled\":true}}},\"userDisplayType\":\"User\"},\"clientEventInfo\":{\"component\":\"FollowingSgs\",\"element\":\"user\"}}},{\"entryId\":\"user-1555049139641012224\",\"sortIndex\":\"1984143216454139897\",\"content\":{\"entryType\":\"TimelineTimelineItem\",\"__typename\":\"TimelineTimelineItem\",\"itemContent\":{\"itemType\":\"TimelineUser\",\"__typename\":\"TimelineUser\",\"user_results\":{\"result\":{\"__typename\":\"User\",\"id\":\"VXNlcjoxNTU1MDQ5MTM5NjQxMDEyMjI0\",\"rest_id\":\"1555049139641012224\",\"affiliates_highlighted_label\":{\"label\":{\"url\":{\"url\":\"https://twitter.com/BitgetWallet\",\"urlType\":\"DeepLink\"},\"badge\":{\"url\":\"https://pbs.twimg.com/profile_images/1983940485069811712/aAnECf3c_bigger.png\"},\"description\":\"Bitget Wallet \uD83E\uDE75\",\"userLabelType\":\"BusinessLabel\",\"userLabelDisplayType\":\"Badge\"}},\"has_graduated_access\":true,\"parody_commentary_fan_label\":\"None\",\"is_blue_verified\":true,\"profile_image_shape\":\"Square\",\"legacy\":{\"following\":false,\"can_dm\":true,\"can_media_tag\":true,\"created_at\":\"Thu Aug 04 04:33:31 +0000 2022\",\"default_profile\":true,\"default_profile_image\":false,\"description\":\"Crypto for Everyone！与 8,000 万用户一起，轻松交易、理财、支付和探索 Web3！\uD83E\uDE75\",\"entities\":{\"description\":{\"urls\":[]},\"url\":{\"urls\":[{\"display_url\":\"web3.bitget.com/zh-CN\",\"expanded_url\":\"https://web3.bitget.com/zh-CN\",\"url\":\"https://t.co/sG16yOGiGy\",\"indices\":[0,23]}]}},\"fast_followers_count\":0,\"favourites_count\":1556,\"followers_count\":82738,\"friends_count\":331,\"has_custom_timelines\":false,\"is_translator\":false,\"listed_count\":157,\"location\":\"\",\"media_count\":3107,\"name\":\"Bitget钱包中文频道 \uD83E\uDE75\",\"normal_followers_count\":82738,\"pinned_tweet_ids_str\":[\"1983112239117725835\"],\"possibly_sensitive\":false,\"profile_banner_url\":\"https://pbs.twimg.com/profile_banners/1555049139641012224/1761644074\",\"profile_image_url_https\":\"https://pbs.twimg.com/profile_images/1925144639105036288/6HKH-pHs_normal.jpg\",\"profile_interstitial_type\":\"\",\"screen_name\":\"BitgetWalletCN\",\"statuses_count\":6060,\"translator_type\":\"none\",\"url\":\"https://t.co/sG16yOGiGy\",\"verified\":false,\"verified_type\":\"Business\",\"want_retweets\":false,\"withheld_in_countries\":[]},\"professional\":{\"rest_id\":\"1662495817834582016\",\"professional_type\":\"Business\",\"category\":[{\"id\":962,\"name\":\"Mobile Application\",\"icon_name\":\"IconBriefcaseStroke\"}]},\"tipjar_settings\":{}}},\"userDisplayType\":\"User\"},\"clientEventInfo\":{\"component\":\"FollowingSgs\",\"element\":\"user\"}}},{\"entryId\":\"user-1691056639804399616\",\"sortIndex\":\"1984143216454139896\",\"content\":{\"entryType\":\"TimelineTimelineItem\",\"__typename\":\"TimelineTimelineItem\",\"itemContent\":{\"itemType\":\"TimelineUser\",\"__typename\":\"TimelineUser\",\"user_results\":{\"result\":{\"__typename\":\"User\",\"id\":\"VXNlcjoxNjkxMDU2NjM5ODA0Mzk5NjE2\",\"rest_id\":\"1691056639804399616\",\"affiliates_highlighted_label\":{},\"has_graduated_access\":true,\"parody_commentary_fan_label\":\"None\",\"is_blue_verified\":true,\"profile_image_shape\":\"Circle\",\"legacy\":{\"following\":false,\"can_dm\":true,\"can_media_tag\":true,\"created_at\":\"Mon Aug 14 11:58:33 +0000 2023\",\"default_profile\":true,\"default_profile_image\":false,\"description\":\"矿工⚒\uFE0F矿场主 | 2013老韭菜 ｜ Bitcoin信徒｜ 特斯拉股票持有者 | @BitWawaCom 提供 ＃比特币挖矿 #矿机托管 一站式服务 | 本人微信&主页：https://t.co/Yrg5MSVwJw\",\"entities\":{\"description\":{\"urls\":[{\"display_url\":\"vlink.cc/vio\",\"expanded_url\":\"http://vlink.cc/vio\",\"url\":\"https://t.co/Yrg5MSVwJw\",\"indices\":[86,109]}]},\"url\":{\"urls\":[{\"display_url\":\"vlink.cc/vio\",\"expanded_url\":\"http://vlink.cc/vio\",\"url\":\"https://t.co/Yrg5MSVwJw\",\"indices\":[0,23]}]}},\"fast_followers_count\":0,\"favourites_count\":13441,\"followers_count\":44047,\"friends_count\":505,\"has_custom_timelines\":false,\"is_translator\":false,\"listed_count\":113,\"location\":\"Hong Kong\",\"media_count\":1924,\"name\":\"夏雪宜\",\"normal_followers_count\":44047,\"pinned_tweet_ids_str\":[\"1983835466106597684\"],\"possibly_sensitive\":false,\"profile_banner_url\":\"https://pbs.twimg.com/profile_banners/1691056639804399616/1730437560\",\"profile_image_url_https\":\"https://pbs.twimg.com/profile_images/1852215481492774912/OVJUSux3_normal.jpg\",\"profile_interstitial_type\":\"\",\"screen_name\":\"XXY177\",\"statuses_count\":18063,\"translator_type\":\"none\",\"url\":\"https://t.co/Yrg5MSVwJw\",\"verified\":false,\"want_retweets\":false,\"withheld_in_countries\":[]},\"tipjar_settings\":{}}},\"userDisplayType\":\"User\"},\"clientEventInfo\":{\"component\":\"FollowingSgs\",\"element\":\"user\"}}},{\"entryId\":\"user-902926941413453824\",\"sortIndex\":\"1984143216454139895\",\"content\":{\"entryType\":\"TimelineTimelineItem\",\"__typename\":\"TimelineTimelineItem\",\"itemContent\":{\"itemType\":\"TimelineUser\",\"__typename\":\"TimelineUser\",\"user_results\":{\"result\":{\"__typename\":\"User\",\"id\":\"VXNlcjo5MDI5MjY5NDE0MTM0NTM4MjQ=\",\"rest_id\":\"902926941413453824\",\"affiliates_highlighted_label\":{},\"has_graduated_access\":true,\"parody_commentary_fan_label\":\"None\",\"is_blue_verified\":true,\"profile_image_shape\":\"Circle\",\"legacy\":{\"following\":false,\"can_dm\":false,\"can_media_tag\":true,\"created_at\":\"Wed Aug 30 16:12:13 +0000 2017\",\"default_profile\":false,\"default_profile_image\":false,\"description\":\"@BNBchain\\n@YZiLabs\\n@GiggleAcademy\\n@binance\",\"entities\":{\"description\":{\"urls\":[]},\"url\":{\"urls\":[{\"display_url\":\"binance.com\",\"expanded_url\":\"http://www.binance.com\",\"url\":\"https://t.co/zlvCSBIFGA\",\"indices\":[0,23]}]}},\"fast_followers_count\":0,\"favourites_count\":17527,\"followers_count\":10411435,\"friends_count\":1897,\"has_custom_timelines\":true,\"is_translator\":false,\"listed_count\":38806,\"location\":\"\",\"media_count\":916,\"name\":\"CZ \uD83D\uDD36 BNB\",\"normal_followers_count\":10411435,\"pinned_tweet_ids_str\":[\"1981404850832494666\"],\"possibly_sensitive\":false,\"profile_banner_url\":\"https://pbs.twimg.com/profile_banners/902926941413453824/1597864552\",\"profile_image_url_https\":\"https://pbs.twimg.com/profile_images/1961440580279336960/PiiIs8Lh_normal.jpg\",\"profile_interstitial_type\":\"\",\"screen_name\":\"cz_binance\",\"statuses_count\":7443,\"translator_type\":\"none\",\"url\":\"https://t.co/zlvCSBIFGA\",\"verified\":false,\"want_retweets\":false,\"withheld_in_countries\":[]},\"professional\":{\"rest_id\":\"1545517037472153601\",\"professional_type\":\"Creator\",\"category\":[{\"id\":713,\"name\":\"Science & Technology\",\"icon_name\":\"IconBriefcaseStroke\"}]},\"tipjar_settings\":{\"is_enabled\":true}}},\"userDisplayType\":\"User\"},\"clientEventInfo\":{\"component\":\"FollowingSgs\",\"element\":\"user\"}}},{\"entryId\":\"user-867617849208037377\",\"sortIndex\":\"1984143216454139894\",\"content\":{\"entryType\":\"TimelineTimelineItem\",\"__typename\":\"TimelineTimelineItem\",\"itemContent\":{\"itemType\":\"TimelineUser\",\"__typename\":\"TimelineUser\",\"user_results\":{\"result\":{\"__typename\":\"User\",\"id\":\"VXNlcjo4Njc2MTc4NDkyMDgwMzczNzc=\",\"rest_id\":\"867617849208037377\",\"affiliates_highlighted_label\":{},\"has_graduated_access\":true,\"parody_commentary_fan_label\":\"None\",\"is_blue_verified\":true,\"profile_image_shape\":\"Square\",\"legacy\":{\"following\":false,\"can_dm\":true,\"can_media_tag\":false,\"created_at\":\"Thu May 25 05:46:29 +0000 2017\",\"default_profile\":false,\"default_profile_image\":false,\"description\":\"A new alternative for your crypto journey | Self-custody & dApps: @Wallet | Support: @OKXHelpDesk | UK users: @OKX_UK\",\"entities\":{\"description\":{\"urls\":[]},\"url\":{\"urls\":[{\"display_url\":\"okx.com\",\"expanded_url\":\"https://www.okx.com\",\"url\":\"https://t.co/zUK2ThuSHs\",\"indices\":[0,23]}]}},\"fast_followers_count\":0,\"favourites_count\":20383,\"followers_count\":5721676,\"friends_count\":317,\"has_custom_timelines\":true,\"is_translator\":false,\"listed_count\":8048,\"location\":\"\",\"media_count\":13767,\"name\":\"OKX\",\"normal_followers_count\":5721676,\"pinned_tweet_ids_str\":[\"1983791071122342345\"],\"possibly_sensitive\":false,\"profile_banner_url\":\"https://pbs.twimg.com/profile_banners/867617849208037377/1760060058\",\"profile_image_url_https\":\"https://pbs.twimg.com/profile_images/1968722816154345472/vEj4j3o9_normal.jpg\",\"profile_interstitial_type\":\"\",\"screen_name\":\"okx\",\"statuses_count\":40909,\"translator_type\":\"none\",\"url\":\"https://t.co/zUK2ThuSHs\",\"verified\":false,\"verified_type\":\"Business\",\"want_retweets\":false,\"withheld_in_countries\":[]},\"professional\":{\"rest_id\":\"1547228355451314177\",\"professional_type\":\"Business\",\"category\":[]},\"tipjar_settings\":{}}},\"userDisplayType\":\"User\"},\"clientEventInfo\":{\"component\":\"FollowingSgs\",\"element\":\"user\"}}},{\"entryId\":\"user-1222182756400037889\",\"sortIndex\":\"1984143216454139893\",\"content\":{\"entryType\":\"TimelineTimelineItem\",\"__typename\":\"TimelineTimelineItem\",\"itemContent\":{\"itemType\":\"TimelineUser\",\"__typename\":\"TimelineUser\",\"user_results\":{\"result\":{\"__typename\":\"User\",\"id\":\"VXNlcjoxMjIyMTgyNzU2NDAwMDM3ODg5\",\"rest_id\":\"1222182756400037889\",\"affiliates_highlighted_label\":{\"label\":{\"url\":{\"url\":\"https://twitter.com/trondao\",\"urlType\":\"DeepLink\"},\"badge\":{\"url\":\"https://pbs.twimg.com/profile_images/1970541264568520704/J6wYDxYk_bigger.jpg\"},\"description\":\"TRON DAO\",\"userLabelType\":\"BusinessLabel\",\"userLabelDisplayType\":\"Badge\"}},\"has_graduated_access\":true,\"parody_commentary_fan_label\":\"None\",\"is_blue_verified\":true,\"profile_image_shape\":\"Circle\",\"legacy\":{\"following\":false,\"can_dm\":true,\"can_media_tag\":true,\"created_at\":\"Tue Jan 28 15:41:01 +0000 2020\",\"default_profile\":true,\"default_profile_image\":false,\"description\":\"\uD83D\uDC68\u200D\uD83D\uDCBB 企业家 | \uD83E\uDD35\u200D♂\uFE0F 外交官 | \uD83D\uDC68\u200D\uD83D\uDE80 宇航员 #712 | \uD83C\uDF4C 艺术收藏家 | 创始人 @trondaoCN | 顾问 @BitTorrent & @htx_global | 英文@justinsuntron\",\"entities\":{\"description\":{\"urls\":[]},\"url\":{\"urls\":[{\"display_url\":\"sunpump.meme\",\"expanded_url\":\"https://sunpump.meme\",\"url\":\"https://t.co/taPoSJSTqy\",\"indices\":[0,23]}]}},\"fast_followers_count\":0,\"favourites_count\":83,\"followers_count\":222344,\"friends_count\":273,\"has_custom_timelines\":false,\"is_translator\":false,\"listed_count\":875,\"location\":\"Singapore\",\"media_count\":2972,\"name\":\"孙宇晨（去过太空版）\uD83E\uDDD1\u200D\uD83D\uDE80\",\"normal_followers_count\":222344,\"pinned_tweet_ids_str\":[\"1905450912065229054\"],\"possibly_sensitive\":false,\"profile_banner_url\":\"https://pbs.twimg.com/profile_banners/1222182756400037889/1705557778\",\"profile_image_url_https\":\"https://pbs.twimg.com/profile_images/1955272811448340480/M9982AS6_normal.jpg\",\"profile_interstitial_type\":\"\",\"screen_name\":\"sunyuchentron\",\"statuses_count\":8394,\"translator_type\":\"none\",\"url\":\"https://t.co/taPoSJSTqy\",\"verified\":false,\"want_retweets\":false,\"withheld_in_countries\":[]},\"tipjar_settings\":{},\"super_follow_eligible\":true}},\"userDisplayType\":\"User\"},\"clientEventInfo\":{\"component\":\"FollowingSgs\",\"element\":\"user\"}}},{\"entryId\":\"user-1461224994705649671\",\"sortIndex\":\"1984143216454139892\",\"content\":{\"entryType\":\"TimelineTimelineItem\",\"__typename\":\"TimelineTimelineItem\",\"itemContent\":{\"itemType\":\"TimelineUser\",\"__typename\":\"TimelineUser\",\"user_results\":{\"result\":{\"__typename\":\"User\",\"id\":\"VXNlcjoxNDYxMjI0OTk0NzA1NjQ5Njcx\",\"rest_id\":\"1461224994705649671\",\"affiliates_highlighted_label\":{\"label\":{\"url\":{\"url\":\"https://twitter.com/okx\",\"urlType\":\"DeepLink\"},\"badge\":{\"url\":\"https://pbs.twimg.com/profile_images/1968722816154345472/vEj4j3o9_bigger.jpg\"},\"description\":\"OKX\",\"userLabelType\":\"BusinessLabel\",\"userLabelDisplayType\":\"Badge\"}},\"has_graduated_access\":true,\"parody_commentary_fan_label\":\"None\",\"is_blue_verified\":true,\"profile_image_shape\":\"Square\",\"legacy\":{\"following\":false,\"can_dm\":true,\"can_media_tag\":true,\"created_at\":\"Thu Nov 18 06:49:35 +0000 2021\",\"default_profile\":true,\"default_profile_image\":false,\"description\":\"全球领先的加密资产交易平台和Web3平台｜@mancity @mclarenf1 赞助商\\n注册领奖励：https://t.co/WUckrWa5WJ\\n其他官方频道：https://t.co/brxmhX5M10\\n*某些产品服务或推广活动不适用于部分地区\",\"entities\":{\"description\":{\"urls\":[{\"display_url\":\"okx.com/ul/6CngT5?chan…\",\"expanded_url\":\"https://www.okx.com/ul/6CngT5?channelId=TWITTERCN\",\"url\":\"https://t.co/WUckrWa5WJ\",\"indices\":[51,74]},{\"display_url\":\"linktr.ee/okxchinese\",\"expanded_url\":\"http://linktr.ee/okxchinese\",\"url\":\"https://t.co/brxmhX5M10\",\"indices\":[82,105]}]},\"url\":{\"urls\":[{\"display_url\":\"okx.com/ul/6CngT5?chan…\",\"expanded_url\":\"https://www.okx.com/ul/6CngT5?channelId=TWITTERCN\",\"url\":\"https://t.co/WUckrWa5WJ\",\"indices\":[0,23]}]}},\"fast_followers_count\":0,\"favourites_count\":7133,\"followers_count\":712513,\"friends_count\":314,\"has_custom_timelines\":true,\"is_translator\":false,\"listed_count\":1623,\"location\":\"\",\"media_count\":5643,\"name\":\"OKX中文\",\"normal_followers_count\":712513,\"pinned_tweet_ids_str\":[\"1984108555407126734\"],\"possibly_sensitive\":false,\"profile_banner_url\":\"https://pbs.twimg.com/profile_banners/1461224994705649671/1760498526\",\"profile_image_url_https\":\"https://pbs.twimg.com/profile_images/1873911184954712065/nUfQZKah_normal.jpg\",\"profile_interstitial_type\":\"\",\"screen_name\":\"okxchinese\",\"statuses_count\":12930,\"translator_type\":\"none\",\"url\":\"https://t.co/WUckrWa5WJ\",\"verified\":false,\"verified_type\":\"Business\",\"want_retweets\":false,\"withheld_in_countries\":[]},\"professional\":{\"rest_id\":\"1468146192404336642\",\"professional_type\":\"Business\",\"category\":[]},\"tipjar_settings\":{\"is_enabled\":false,\"bitcoin_handle\":\"396iZz54rdPj2T6qDTdBqNDkreNH6cBxUq\",\"ethereum_handle\":\"0x719A9C353d11B99ad57c8C24222fE7C7A49717f9\"}}},\"userDisplayType\":\"User\"},\"clientEventInfo\":{\"component\":\"FollowingSgs\",\"element\":\"user\"}}},{\"entryId\":\"user-1554679425043943424\",\"sortIndex\":\"1984143216454139891\",\"content\":{\"entryType\":\"TimelineTimelineItem\",\"__typename\":\"TimelineTimelineItem\",\"itemContent\":{\"itemType\":\"TimelineUser\",\"__typename\":\"TimelineUser\",\"user_results\":{\"result\":{\"__typename\":\"User\",\"id\":\"VXNlcjoxNTU0Njc5NDI1MDQzOTQzNDI0\",\"rest_id\":\"1554679425043943424\",\"affiliates_highlighted_label\":{\"label\":{\"url\":{\"url\":\"https://twitter.com/okx\",\"urlType\":\"DeepLink\"},\"badge\":{\"url\":\"https://pbs.twimg.com/profile_images/1968722816154345472/vEj4j3o9_bigger.jpg\"},\"description\":\"OKX\",\"userLabelType\":\"BusinessLabel\",\"userLabelDisplayType\":\"Badge\"}},\"has_graduated_access\":true,\"parody_commentary_fan_label\":\"None\",\"is_blue_verified\":true,\"profile_image_shape\":\"Square\",\"legacy\":{\"following\":false,\"can_dm\":true,\"can_media_tag\":true,\"created_at\":\"Wed Aug 03 04:04:04 +0000 2022\",\"default_profile\":true,\"default_profile_image\":false,\"description\":\"Web3 入口，一个就够！ \\n累计支持 140 条公链 - 涵盖钱包、DEX、Earn、NFT 市场、DApp 探索 5 大板块。\\n加入社群：https://t.co/v6XAyVJALQ\",\"entities\":{\"description\":{\"urls\":[{\"display_url\":\"t.me/OKXWallet_CN\",\"expanded_url\":\"https://t.me/OKXWallet_CN\",\"url\":\"https://t.co/v6XAyVJALQ\",\"indices\":[71,94]}]},\"url\":{\"urls\":[{\"display_url\":\"web3.okx.com\",\"expanded_url\":\"https://web3.okx.com/\",\"url\":\"https://t.co/Cfg0hpvZcj\",\"indices\":[0,23]}]}},\"fast_followers_count\":0,\"favourites_count\":583,\"followers_count\":128371,\"friends_count\":206,\"has_custom_timelines\":false,\"is_translator\":false,\"listed_count\":313,\"location\":\"\",\"media_count\":1753,\"name\":\"OKX Wallet 中文\",\"normal_followers_count\":128371,\"pinned_tweet_ids_str\":[],\"possibly_sensitive\":false,\"profile_banner_url\":\"https://pbs.twimg.com/profile_banners/1554679425043943424/1741658151\",\"profile_image_url_https\":\"https://pbs.twimg.com/profile_images/1874703336097894400/NDM4e6IQ_normal.jpg\",\"profile_interstitial_type\":\"\",\"screen_name\":\"OKXWallet_CN\",\"statuses_count\":2933,\"translator_type\":\"none\",\"url\":\"https://t.co/Cfg0hpvZcj\",\"verified\":false,\"verified_type\":\"Business\",\"want_retweets\":false,\"withheld_in_countries\":[]},\"professional\":{\"rest_id\":\"1595017927950209024\",\"professional_type\":\"Business\",\"category\":[]},\"tipjar_settings\":{}}},\"userDisplayType\":\"User\"},\"clientEventInfo\":{\"component\":\"FollowingSgs\",\"element\":\"user\"}}},{\"entryId\":\"user-1883402015340113920\",\"sortIndex\":\"1984143216454139890\",\"content\":{\"entryType\":\"TimelineTimelineItem\",\"__typename\":\"TimelineTimelineItem\",\"itemContent\":{\"itemType\":\"TimelineUser\",\"__typename\":\"TimelineUser\",\"user_results\":{\"result\":{\"__typename\":\"User\",\"id\":\"VXNlcjoxODgzNDAyMDE1MzQwMTEzOTIw\",\"rest_id\":\"1883402015340113920\",\"affiliates_highlighted_label\":{},\"has_graduated_access\":true,\"parody_commentary_fan_label\":\"None\",\"is_blue_verified\":true,\"profile_image_shape\":\"Circle\",\"legacy\":{\"following\":false,\"can_dm\":true,\"can_media_tag\":true,\"created_at\":\"Sun Jan 26 06:30:15 +0000 2025\",\"default_profile\":true,\"default_profile_image\":false,\"description\":\"OKX DEX最高返佣：https://t.co/3XLREpwOSr 请填写邀请码：BUZAI\",\"entities\":{\"description\":{\"urls\":[{\"display_url\":\"web3.okx.com/ul/joindex?ref…\",\"expanded_url\":\"https://web3.okx.com/ul/joindex?ref=BUZAI\",\"url\":\"https://t.co/3XLREpwOSr\",\"indices\":[12,35]}]},\"url\":{\"urls\":[{\"display_url\":\"t.me/okbokbokx\",\"expanded_url\":\"https://t.me/okbokbokx\",\"url\":\"https://t.co/WaR2K7zao6\",\"indices\":[0,23]}]}},\"fast_followers_count\":0,\"favourites_count\":225,\"followers_count\":1212,\"friends_count\":485,\"has_custom_timelines\":false,\"is_translator\":false,\"listed_count\":10,\"location\":\"\",\"media_count\":35,\"name\":\"布仔.OKX\",\"normal_followers_count\":1212,\"pinned_tweet_ids_str\":[],\"possibly_sensitive\":false,\"profile_banner_url\":\"https://pbs.twimg.com/profile_banners/1883402015340113920/1758372393\",\"profile_image_url_https\":\"https://pbs.twimg.com/profile_images/1883406555867127808/A_SOTgl1_normal.jpg\",\"profile_interstitial_type\":\"\",\"screen_name\":\"buzai_blast\",\"statuses_count\":134,\"translator_type\":\"none\",\"url\":\"https://t.co/WaR2K7zao6\",\"verified\":false,\"want_retweets\":false,\"withheld_in_countries\":[]},\"tipjar_settings\":{\"is_enabled\":true,\"ethereum_handle\":\"0xfd0f7d8a9fc80d5c83241182582aff915cba7fab\"}}},\"userDisplayType\":\"User\"},\"clientEventInfo\":{\"component\":\"FollowingSgs\",\"element\":\"user\"}}},{\"entryId\":\"user-1739923729134567424\",\"sortIndex\":\"1984143216454139889\",\"content\":{\"entryType\":\"TimelineTimelineItem\",\"__typename\":\"TimelineTimelineItem\",\"itemContent\":{\"itemType\":\"TimelineUser\",\"__typename\":\"TimelineUser\",\"user_results\":{\"result\":{\"__typename\":\"User\",\"id\":\"VXNlcjoxNzM5OTIzNzI5MTM0NTY3NDI0\",\"rest_id\":\"1739923729134567424\",\"affiliates_highlighted_label\":{},\"has_graduated_access\":true,\"parody_commentary_fan_label\":\"None\",\"is_blue_verified\":false,\"profile_image_shape\":\"Circle\",\"legacy\":{\"following\":false,\"can_dm\":true,\"can_media_tag\":true,\"created_at\":\"Wed Dec 27 08:18:52 +0000 2023\",\"default_profile\":true,\"default_profile_image\":false,\"description\":\"\uD83C\uDF10 Web3 Enthusiast | Exploring Blockchain & Crypto\\nBeliever in $GMM \uD83D\uDE80 | Trusting @pumpfun_mom \uD83D\uDE4C | Open & ready for collabs \uD83E\uDD1D\",\"entities\":{\"description\":{\"urls\":[]},\"url\":{\"urls\":[{\"display_url\":\"t.me/ombatijapesa\",\"expanded_url\":\"https://t.me/ombatijapesa\",\"url\":\"https://t.co/KYhgHEsoY3\",\"indices\":[0,23]}]}},\"fast_followers_count\":0,\"favourites_count\":12638,\"followers_count\":2154,\"friends_count\":2222,\"has_custom_timelines\":false,\"is_translator\":false,\"listed_count\":1,\"location\":\"Republic of Serbia\",\"media_count\":891,\"name\":\"Richard. Nakax\",\"normal_followers_count\":2154,\"pinned_tweet_ids_str\":[\"1983973063671845254\"],\"possibly_sensitive\":false,\"profile_banner_url\":\"https://pbs.twimg.com/profile_banners/1739923729134567424/1753699238\",\"profile_image_url_https\":\"https://pbs.twimg.com/profile_images/1980918926327328768/2R5jmfZ3_normal.jpg\",\"profile_interstitial_type\":\"\",\"screen_name\":\"_Richie045\",\"statuses_count\":11797,\"translator_type\":\"none\",\"url\":\"https://t.co/KYhgHEsoY3\",\"verified\":false,\"want_retweets\":false,\"withheld_in_countries\":[]},\"professional\":{\"rest_id\":\"1948440154873500047\",\"professional_type\":\"Creator\",\"category\":[{\"id\":478,\"name\":\"Advertising & Marketing Agency\",\"icon_name\":\"IconBriefcaseStroke\"}]},\"tipjar_settings\":{\"is_enabled\":true,\"bitcoin_handle\":\"bc1qcvfrfs472mf45eug8aehw52gx9wvk0y7fpjc73\",\"ethereum_handle\":\"0x8bd9b2637611a1c20F89050597fC80866F6BEC5b\"}}},\"userDisplayType\":\"User\"},\"clientEventInfo\":{\"component\":\"FollowingSgs\",\"element\":\"user\"}}},{\"entryId\":\"user-1866601077887447040\",\"sortIndex\":\"1984143216454139888\",\"content\":{\"entryType\":\"TimelineTimelineItem\",\"__typename\":\"TimelineTimelineItem\",\"itemContent\":{\"itemType\":\"TimelineUser\",\"__typename\":\"TimelineUser\",\"user_results\":{\"result\":{\"__typename\":\"User\",\"id\":\"VXNlcjoxODY2NjAxMDc3ODg3NDQ3MDQw\",\"rest_id\":\"1866601077887447040\",\"affiliates_highlighted_label\":{},\"has_graduated_access\":true,\"parody_commentary_fan_label\":\"None\",\"is_blue_verified\":true,\"profile_image_shape\":\"Circle\",\"legacy\":{\"following\":false,\"can_dm\":true,\"can_media_tag\":true,\"created_at\":\"Tue Dec 10 21:50:05 +0000 2024\",\"default_profile\":true,\"default_profile_image\":false,\"description\":\"$XDOG — The first Memecoin on OKX’s XLayer chain.\\n$XDOG — OKX 旗下 XLayer 链上的第一个 Meme 币。\\n\\nCA: 0x0cc24c51bf89c00c5affbfcf5e856c25ecbdb48e\",\"entities\":{\"description\":{\"urls\":[]},\"url\":{\"urls\":[{\"display_url\":\"t.me/okbokbokx\",\"expanded_url\":\"http://t.me/okbokbokx\",\"url\":\"https://t.co/H4ZnkWw1cT\",\"indices\":[0,23]}]}},\"fast_followers_count\":0,\"favourites_count\":722,\"followers_count\":7586,\"friends_count\":22,\"has_custom_timelines\":false,\"is_translator\":false,\"listed_count\":14,\"location\":\"OKX\",\"media_count\":492,\"name\":\"XDOG\",\"normal_followers_count\":7586,\"pinned_tweet_ids_str\":[\"1982639890354626851\"],\"possibly_sensitive\":false,\"profile_banner_url\":\"https://pbs.twimg.com/profile_banners/1866601077887447040/1761880842\",\"profile_image_url_https\":\"https://pbs.twimg.com/profile_images/1958501946593271808/LTvldE51_normal.jpg\",\"profile_interstitial_type\":\"\",\"screen_name\":\"xdog_meme\",\"statuses_count\":840,\"translator_type\":\"none\",\"url\":\"https://t.co/H4ZnkWw1cT\",\"verified\":false,\"want_retweets\":false,\"withheld_in_countries\":[]},\"tipjar_settings\":{}}},\"userDisplayType\":\"User\"},\"clientEventInfo\":{\"component\":\"FollowingSgs\",\"element\":\"user\"}}},{\"entryId\":\"user-1908096561290113024\",\"sortIndex\":\"1984143216454139887\",\"content\":{\"entryType\":\"TimelineTimelineItem\",\"__typename\":\"TimelineTimelineItem\",\"itemContent\":{\"itemType\":\"TimelineUser\",\"__typename\":\"TimelineUser\",\"user_results\":{\"result\":{\"__typename\":\"User\",\"id\":\"VXNlcjoxOTA4MDk2NTYxMjkwMTEzMDI0\",\"rest_id\":\"1908096561290113024\",\"affiliates_highlighted_label\":{},\"has_graduated_access\":true,\"parody_commentary_fan_label\":\"None\",\"is_blue_verified\":true,\"profile_image_shape\":\"Circle\",\"legacy\":{\"following\":false,\"can_dm\":true,\"can_media_tag\":true,\"created_at\":\"Fri Apr 04 09:57:43 +0000 2025\",\"default_profile\":true,\"default_profile_image\":false,\"description\":\"\\\"Xbox\\\" is a new type of blockchain project that integrates blockchain resources through a blind box sales ecosystem\\n0x16d69325bc7e6978c2cf178c7fd4b45b990929ad\",\"entities\":{\"description\":{\"urls\":[]},\"url\":{\"urls\":[{\"display_url\":\"okxbox.com\",\"expanded_url\":\"http://okxbox.com\",\"url\":\"https://t.co/JUuDTglrUt\",\"indices\":[0,23]}]}},\"fast_followers_count\":0,\"favourites_count\":64,\"followers_count\":584,\"friends_count\":31,\"has_custom_timelines\":false,\"is_translator\":false,\"listed_count\":4,\"location\":\"X  Layer\",\"media_count\":130,\"name\":\"XBOX . OKX\",\"normal_followers_count\":584,\"pinned_tweet_ids_str\":[\"1976009441444057394\"],\"possibly_sensitive\":false,\"profile_banner_url\":\"https://pbs.twimg.com/profile_banners/1908096561290113024/1756356688\",\"profile_image_url_https\":\"https://pbs.twimg.com/profile_images/1960928176894296065/88QIr624_normal.jpg\",\"profile_interstitial_type\":\"\",\"screen_name\":\"OKXBOXCOM\",\"statuses_count\":300,\"translator_type\":\"none\",\"url\":\"https://t.co/JUuDTglrUt\",\"verified\":false,\"want_retweets\":false,\"withheld_in_countries\":[]},\"tipjar_settings\":{}}},\"userDisplayType\":\"User\"},\"clientEventInfo\":{\"component\":\"FollowingSgs\",\"element\":\"user\"}}},{\"entryId\":\"user-1719688604551700480\",\"sortIndex\":\"1984143216454139886\",\"content\":{\"entryType\":\"TimelineTimelineItem\",\"__typename\":\"TimelineTimelineItem\",\"itemContent\":{\"itemType\":\"TimelineUser\",\"__typename\":\"TimelineUser\",\"user_results\":{\"result\":{\"__typename\":\"User\",\"id\":\"VXNlcjoxNzE5Njg4NjA0NTUxNzAwNDgw\",\"rest_id\":\"1719688604551700480\",\"affiliates_highlighted_label\":{\"label\":{\"url\":{\"url\":\"https://twitter.com/okx\",\"urlType\":\"DeepLink\"},\"badge\":{\"url\":\"https://pbs.twimg.com/profile_images/1968722816154345472/vEj4j3o9_bigger.jpg\"},\"description\":\"OKX\",\"userLabelType\":\"BusinessLabel\",\"userLabelDisplayType\":\"Badge\"}},\"has_graduated_access\":true,\"parody_commentary_fan_label\":\"None\",\"is_blue_verified\":true,\"profile_image_shape\":\"Square\",\"legacy\":{\"following\":false,\"can_dm\":true,\"can_media_tag\":true,\"created_at\":\"Wed Nov 01 12:11:47 +0000 2023\",\"default_profile\":true,\"default_profile_image\":false,\"description\":\"The New Money Chain. Make everything onchain. The only official X Layer channel. Engagement ≠ Endorsement.\",\"entities\":{\"description\":{\"urls\":[]},\"url\":{\"urls\":[{\"display_url\":\"web3.okx.com/xlayer\",\"expanded_url\":\"https://web3.okx.com/xlayer\",\"url\":\"https://t.co/C73vYlZBMF\",\"indices\":[0,23]}]}},\"fast_followers_count\":0,\"favourites_count\":373,\"followers_count\":152970,\"friends_count\":29,\"has_custom_timelines\":false,\"is_translator\":false,\"listed_count\":311,\"location\":\"\",\"media_count\":162,\"name\":\"X Layer\",\"normal_followers_count\":152970,\"pinned_tweet_ids_str\":[],\"possibly_sensitive\":false,\"profile_banner_url\":\"https://pbs.twimg.com/profile_banners/1719688604551700480/1756317468\",\"profile_image_url_https\":\"https://pbs.twimg.com/profile_images/1961107616374865920/k_dCk5Vm_normal.jpg\",\"profile_interstitial_type\":\"\",\"screen_name\":\"XLayerOfficial\",\"statuses_count\":530,\"translator_type\":\"none\",\"url\":\"https://t.co/C73vYlZBMF\",\"verified\":false,\"verified_type\":\"Business\",\"want_retweets\":false,\"withheld_in_countries\":[]},\"tipjar_settings\":{}}},\"userDisplayType\":\"User\"},\"clientEventInfo\":{\"component\":\"FollowingSgs\",\"element\":\"user\"}}},{\"entryId\":\"user-463102662\",\"sortIndex\":\"1984143216454139885\",\"content\":{\"entryType\":\"TimelineTimelineItem\",\"__typename\":\"TimelineTimelineItem\",\"itemContent\":{\"itemType\":\"TimelineUser\",\"__typename\":\"TimelineUser\",\"user_results\":{\"result\":{\"__typename\":\"User\",\"id\":\"VXNlcjo0NjMxMDI2NjI=\",\"rest_id\":\"463102662\",\"affiliates_highlighted_label\":{},\"has_graduated_access\":true,\"parody_commentary_fan_label\":\"None\",\"is_blue_verified\":false,\"profile_image_shape\":\"Circle\",\"legacy\":{\"following\":false,\"can_dm\":true,\"can_media_tag\":true,\"created_at\":\"Fri Jan 13 18:36:44 +0000 2012\",\"default_profile\":true,\"default_profile_image\":false,\"description\":\"@XLayerOfficial builder #001. Tweets are not endorsements.\",\"entities\":{\"description\":{\"urls\":[]}},\"fast_followers_count\":0,\"favourites_count\":18980,\"followers_count\":14182,\"friends_count\":529,\"has_custom_timelines\":true,\"is_translator\":false,\"listed_count\":131,\"location\":\"Metaverse\",\"media_count\":23,\"name\":\"Felix\",\"normal_followers_count\":14182,\"pinned_tweet_ids_str\":[],\"possibly_sensitive\":false,\"profile_banner_url\":\"https://pbs.twimg.com/profile_banners/463102662/1673288296\",\"profile_image_url_https\":\"https://pbs.twimg.com/profile_images/1964205995665842176/mrU7cJdC_normal.jpg\",\"profile_interstitial_type\":\"\",\"screen_name\":\"felix_okx\",\"statuses_count\":499,\"translator_type\":\"none\",\"verified\":false,\"want_retweets\":false,\"withheld_in_countries\":[]},\"tipjar_settings\":{\"is_enabled\":false,\"bitcoin_handle\":\"3Q4Bz9Ngdo3tUSfgXn7NZ7b3qXwweLLyLH\",\"ethereum_handle\":\"0x9ad2cb35bfe658036aa28b1b3b086ef37643ad17\"}}},\"userDisplayType\":\"User\"},\"clientEventInfo\":{\"component\":\"FollowingSgs\",\"element\":\"user\"}}},{\"entryId\":\"user-1766071195840253952\",\"sortIndex\":\"1984143216454139884\",\"content\":{\"entryType\":\"TimelineTimelineItem\",\"__typename\":\"TimelineTimelineItem\",\"itemContent\":{\"itemType\":\"TimelineUser\",\"__typename\":\"TimelineUser\",\"user_results\":{\"result\":{\"__typename\":\"User\",\"id\":\"VXNlcjoxNzY2MDcxMTk1ODQwMjUzOTUy\",\"rest_id\":\"1766071195840253952\",\"affiliates_highlighted_label\":{},\"has_graduated_access\":true,\"parody_commentary_fan_label\":\"None\",\"is_blue_verified\":true,\"profile_image_shape\":\"Circle\",\"legacy\":{\"following\":false,\"can_dm\":true,\"can_media_tag\":true,\"created_at\":\"Fri Mar 08 11:59:28 +0000 2024\",\"default_profile\":true,\"default_profile_image\":false,\"description\":\"17年入圈，几经沉浮，这轮牛市努力拿到大结果。\\n1、大饼主仓位，吃beta。链上小仓位，抓alpha。\\n2、投资为主，写作为辅。X上碎语，以诚待人，交个朋友。\\n3、近期深耕 X Layer，期待找到10+优质长期项目，共同成长。\\n4、不接广告，如用OK钱包，欢迎使用几米20%邀请码：NEWJIMI\",\"entities\":{\"description\":{\"urls\":[]},\"url\":{\"urls\":[{\"display_url\":\"t.me/XLayer100x\",\"expanded_url\":\"https://t.me/XLayer100x\",\"url\":\"https://t.co/nF0GwjDtEg\",\"indices\":[0,23]}]}},\"fast_followers_count\":0,\"favourites_count\":4097,\"followers_count\":3298,\"friends_count\":965,\"has_custom_timelines\":false,\"is_translator\":false,\"listed_count\":43,\"location\":\"X Layer\",\"media_count\":346,\"name\":\"几米（X链钻石手）\",\"normal_followers_count\":3298,\"pinned_tweet_ids_str\":[\"1971854696584564804\"],\"possibly_sensitive\":false,\"profile_banner_url\":\"https://pbs.twimg.com/profile_banners/1766071195840253952/1757298089\",\"profile_image_url_https\":\"https://pbs.twimg.com/profile_images/1766627918074048512/PiWCDXoB_normal.jpg\",\"profile_interstitial_type\":\"\",\"screen_name\":\"thlm_jimi\",\"statuses_count\":3161,\"translator_type\":\"none\",\"url\":\"https://t.co/nF0GwjDtEg\",\"verified\":false,\"want_retweets\":false,\"withheld_in_countries\":[]},\"tipjar_settings\":{}}},\"userDisplayType\":\"User\"},\"clientEventInfo\":{\"component\":\"FollowingSgs\",\"element\":\"user\"}}},{\"entryId\":\"user-2985599460\",\"sortIndex\":\"1984143216454139883\",\"content\":{\"entryType\":\"TimelineTimelineItem\",\"__typename\":\"TimelineTimelineItem\",\"itemContent\":{\"itemType\":\"TimelineUser\",\"__typename\":\"TimelineUser\",\"user_results\":{\"result\":{\"__typename\":\"User\",\"id\":\"VXNlcjoyOTg1NTk5NDYw\",\"rest_id\":\"2985599460\",\"affiliates_highlighted_label\":{\"label\":{\"url\":{\"url\":\"https://twitter.com/okx\",\"urlType\":\"DeepLink\"},\"badge\":{\"url\":\"https://pbs.twimg.com/profile_images/1968722816154345472/vEj4j3o9_bigger.jpg\"},\"description\":\"OKX\",\"userLabelType\":\"BusinessLabel\",\"userLabelDisplayType\":\"Badge\"}},\"has_graduated_access\":true,\"parody_commentary_fan_label\":\"None\",\"is_blue_verified\":true,\"profile_image_shape\":\"Circle\",\"legacy\":{\"following\":false,\"can_dm\":false,\"can_media_tag\":true,\"created_at\":\"Fri Jan 16 12:54:31 +0000 2015\",\"default_profile\":true,\"default_profile_image\":false,\"description\":\"Founder & CEO of OKX (since 2013). Crypto will eat the world. Self-custody is the future. Everything will be onchain. Tweets not financial advice.\",\"entities\":{\"description\":{\"urls\":[]},\"url\":{\"urls\":[{\"display_url\":\"okx.com\",\"expanded_url\":\"https://www.okx.com\",\"url\":\"https://t.co/VsJQi0aHw6\",\"indices\":[0,23]}]}},\"fast_followers_count\":0,\"favourites_count\":274,\"followers_count\":188871,\"friends_count\":1062,\"has_custom_timelines\":false,\"is_translator\":false,\"listed_count\":1557,\"location\":\"San Jose, CA\",\"media_count\":83,\"name\":\"Star\",\"normal_followers_count\":188871,\"pinned_tweet_ids_str\":[\"1873943630156816626\"],\"possibly_sensitive\":false,\"profile_banner_url\":\"https://pbs.twimg.com/profile_banners/2985599460/1675042725\",\"profile_image_url_https\":\"https://pbs.twimg.com/profile_images/1627290215189741572/7WVhFT9Q_normal.jpg\",\"profile_interstitial_type\":\"\",\"screen_name\":\"star_okx\",\"statuses_count\":1379,\"translator_type\":\"none\",\"url\":\"https://t.co/VsJQi0aHw6\",\"verified\":false,\"want_retweets\":false,\"withheld_in_countries\":[]},\"professional\":{\"rest_id\":\"1613854344893591554\",\"professional_type\":\"Business\",\"category\":[{\"id\":713,\"name\":\"Science & Technology\",\"icon_name\":\"IconBriefcaseStroke\"}]},\"tipjar_settings\":{}}},\"userDisplayType\":\"User\"},\"clientEventInfo\":{\"component\":\"FollowingSgs\",\"element\":\"user\"}}},{\"entryId\":\"cursor-bottom-1984143216454139882\",\"sortIndex\":\"1984143216454139882\",\"content\":{\"entryType\":\"TimelineTimelineCursor\",\"__typename\":\"TimelineTimelineCursor\",\"value\":\"0|1984143216454139880\",\"cursorType\":\"Bottom\"}},{\"entryId\":\"cursor-top-1984143216454139905\",\"sortIndex\":\"1984143216454139905\",\"content\":{\"entryType\":\"TimelineTimelineCursor\",\"__typename\":\"TimelineTimelineCursor\",\"value\":\"-1|1984143216454139905\",\"cursorType\":\"Top\"}}]}]}}}}}";
            String url = String.format("https://twitter293.p.rapidapi.com/user/%s/followings?count=%d", userId, count);
            processAndSaveFollowUsers(json);
            /*Request request = new Request.Builder()
                .url(url)
                .get()
                .addHeader("x-rapidapi-key", apiKey)
                .addHeader("x-rapidapi-host", "twitter293.p.rapidapi.com")
                .build();

            try (Response response = client.newCall(request).execute()) {
                if (response.isSuccessful() && response.body() != null) {
                    String jsonResponse = response.body().string();
                    processAndSaveFollowUsers(jsonResponse);
                } else {
                    log.error("获取Twitter关注用户数据失败，HTTP状态码: {}", response.code());
                }
            }*/
        } catch (Exception e) {
            log.error("通过API获取Twitter关注用户数据失败", e);
        }
    }
}
